use std::env;
use std::path::PathBuf;
use winres::WindowsResource;

fn main() {
    let out_dir = &PathBuf::from(env::var("OUT_DIR").expect("Failed to get OUT_DIR env"));

    WindowsResource::new()
        .set_icon("./src/assets/logo.ico") // 替换为你的图标文件路径
        .set("ProductName", "Colt Html Runner")
        .set("OriginalFilename", "htmlrunner.exe") // 替换为你的程序名称
        .compile()
        .expect("Failed to compile windows resource");

    let dest_path = out_dir.join("resource.rc");
    std::fs::copy(dest_path, "resource.rc").expect("Failed to copy resource.rc");
}
